/*
 * 
 * Libman
 * 
 * Daniel Kaufmann, Martin Lang, Simon Moosbrugger,
 * Stefan Mayer, Stephan Halbeisen
 * 
 */
package application.exceptions;

/**
 * The Class SessionException.
 */
public class SessionException extends Exception {
	/** The Constant serialVersionUID. */
	private static final long serialVersionUID = 3721922977163110583L;

	/**
	 * The Class SessionDoesNotExistException is thrown if
	 * the Session is not in the Session HashMap
	 */
	public static class SessionDoesNotExistException extends Throwable {

		/** The Constant serialVersionUID. */
		private static final long serialVersionUID = -6796012741856406182L;
	}

	/**
	 * The Class SessionExpiredException is thrown if the
	 * session is older than 10 hours
	 */
	public static class SessionExpiredException extends Throwable {

		/** The Constant serialVersionUID. */
		private static final long serialVersionUID = -5994351008673893989L;
	}

	/**
	 * The Class InvalidIpException is thrown if
	 * a client tries to call a method with a known sessionid
	 * but has another ip
	 */
	public static class InvalidIpException extends Throwable {

		/** The Constant serialVersionUID. */
		private static final long serialVersionUID = 1213159206003814706L;

	}

	/**
	 * Instantiates a new session exception.
	 * 
	 * @param innerException
	 *            the inner exception
	 */
	public SessionException(Throwable innerException) {
		this.initCause(innerException);
	}
}
